package main

import (
    "fmt"
    "go.uber.org/zap"
    "laxkits/lib/laxutils"
    "laxkits/lib/zlogger"
)

type XmlNode struct {
    LogNode zlogger.LaxLogNode `xml:"log"`
}

func main() {
    var xmlNode XmlNode
    if err := laxutils.LoadXmlFile("../eg.xml", &xmlNode); err != nil {
        fmt.Printf("加载xml出错[%v]\n", err)
        return
    }
    fmt.Printf("加载xml成功:[%v]\n", xmlNode)
    zlogger.InitLogger(&xmlNode.LogNode)
    zap.S().Info("succ")
}
